<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<link rel="stylesheet" href="./Tpl/css/bootstrap.min.css">
	<style type="text/css">
	.navbar-fixed-bottom, .navbar-fixed-top{
		position: relative;
	}
	td{
		text-align: center;
	}
/*	.nimade{
		width: 500px;
		margin: 0 auto;
		background: red url() 0 0 no-repeat;
	}*/
	input{
		float: left;
	}
	.hehe{
		width: 100px;
		margin-right: 10px;
	}
	h1{
		width: 500px;
		margin:0px auto;
	}

	</style>
	<title>文件管理</title>
</head>
<body>
	<body>

    <nav class="navbar navbar-inverse navbar-fixed-top">
      <div class="container">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="#">Project name</a>
        </div>
        <div id="navbar" class="collapse navbar-collapse">
          <ul class="nav navbar-nav">
            <li class="active"><a href="#">Home</a></li>
            <li><a href="#about">About</a></li>
            <li><a href="#contact">Contact</a></li>
          </ul>
        </div><!--/.nav-collapse -->
      </div>
    </nav>

    <div class="container">

      <div class="starter-template">
        <h1>最NB的网盘欢迎使用</h1>
     <div class="starter-template nimade">
		<form action="./add.php" method="post" enctype="multipart/form-data">
			<input type="file" class="btn btn-primary dropdown-toggle hehe" multiple="multiple" name="upload[]">
			<input type="submit" class="btn btn-success dropdown-toggle" value="点击上传">
		</form>
	 </div>
       <table class="table table-hover">
       	<tr>
  			<td class="success">文件名</td>
			<td class="warning">文件类型</td>
            <td class="danger">文件大小</td>
            <td class="info">文件操作</td> 
            <td class="active">文件最后修改时间</td>
        </tr>
        <?php foreach ($glob as $k => $v) { 
        	$filename = basename($v);
        	// $content = iconv("gbk","UTF-8//TRANSLIT",$filename); 
        	$filesize=CF(filesize($v)); 
        	$filemtime = filemtime($v);
        	$type = explode('.', $v);
        	$type = end($type);
        	?>
        <tr>
  			<td class="success"><?php echo $filename ?></td>
			<td class="warning"><?php echo $type; ?></td>
            <td class="danger"><?php echo $filesize; ?></td>
            <td class="info"><a href="./del.php?url=<?php echo $v; ?>">删除</a><a href="./down.php?url=<?php echo $v; ?>">下载</a></td> 
            <td class="active"><?php echo date('Y-m-d H:i:s',$filemtime) ?></td>
        </tr>
       	<?php } ?>
       
      </table>
      <!-- 分页 -->
      <nav aria-label="Page navigation">
  <ul class="pagination">
    <?php if ($page<>1) {?>
         <li>
      <a href="./index.php?p=<?php echo $page-1 ?>" aria-label="Previous">
        <span aria-hidden="true">上一页;</span>
      </a>
    </li>
    <?php } ?>
 
    <?php for ($i=1; $i <= $pages ; $i++) { ?>
      <li><a href="./index.php?p=<?php echo $i ?>"><?php echo $i ?></a></li>
    <?php } ?>
        <?php if ($page<>$pages) {?>
         <li>
      <a href="./index.php?p=<?php echo $page+1 ?>" aria-label="Previous">
        <span aria-hidden="true">下一页</span>
      </a>
    </li>
    <?php } ?>
  </ul>
</nav>
      </div>
	
    </div><!-- /.container -->


    
 
 
  
</body>
</body>
</html>
<!-- 